package com.caishi.lkx.gateway.apidowngrade;

import com.zzw.common.gateway.downgrade.ApiDowngrade;
import com.zzw.common.gateway.downgrade.ApiDowngradeHandler;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class CqvipApiDowngradeHandler implements ApiDowngradeHandler {

    @Value("${spring.profiles.active}")
    private String env;

    @Override
    public boolean handler(ApiDowngrade downgrade) {
        // 非线上环境不做降级
        return "pro".equals(env);
    }
}
